package edu.xlh.travel.service.impl;

import edu.xlh.travel.dao.WeChatUser_phoneUserDao;
import edu.xlh.travel.pojo.WeChatUser_phoneUser;
import edu.xlh.travel.service.WeChatUser_phoneUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class WeChatUser_phoneUserServiceImpl implements WeChatUser_phoneUserService {
    @Autowired
    private WeChatUser_phoneUserDao weChatUser_phoneUserDao;
    @Override
    public WeChatUser_phoneUser findByOpenId(String openId) {
        return weChatUser_phoneUserDao.findByOpenId(openId);
    }

    @Override
    public int save(WeChatUser_phoneUser weChatUser_phoneUser) {
        WeChatUser_phoneUser save = weChatUser_phoneUserDao.save(weChatUser_phoneUser);
        if (save != null) {
            return 1;
        }
        return 0;
    }
}
